<template>
    <div class="demo7">
        <!-- <x-header title="选择成员"></x-header> -->
        <div class="tree-menu">
            <noData v-if="theModel == 0"></noData>
            <ul v-for="(menuItem,index) in theModel"
                :key="index">
                <my-tree :model="menuItem"></my-tree>
            </ul>
        </div>
        <myMenu @clickBack="back"></myMenu>
    </div>

</template>

<script>
import myTree from '../treemenu';
import { XHeader, Tabbar, TabbarItem, Group, Cell } from 'vux'
import myMenu from '@/commonComponents/menu'
export default {
    name: 'App',
    data () {
        return {
            theModel: [],
            userId: "",
            tokenId: "",
            projectId: "",
            userInfo: ""
        }
    },
    components: {
        Tabbar,
        TabbarItem,
        Group,
        Cell,
        XHeader,
        myTree,
        myMenu
    },
    created () {
        this.userInfo = JSON.parse(localStorage.userInfo)
        this.userId = this.userInfo.userid;
        this.tokenId = this.userInfo.tokenId;
        this.projectId = this.userInfo.deptid;
        this.getCompany();
    },
    methods: {
        back () {

        },
        getCompany () {
            let param = {
                'allowPaging': true,
                'business': 'GetCheckWorkUser',
                'data': this.projectId,
                'pageIndex': 0,
                'pageSize': 20,
                'tokenId': this.userId,
                'userId': this.tokenId
            }
            this.$axiosAjax.getConfigJson(
                param
            ).then(
                (res) => {
                    this.theModel = res.data.data
                }
            )
        }
    }

}
</script>

<style lang="less" scoped >
.demo7 {
    padding-left: 10px;
}
</style>
